efi/preinstall: Fall back to checking the BootGuard status MSR in HAP mode#535
Merged
chrisccoulson merged 2 commits intocanonical:masterfrom Apr 9, 2026
Conversation
… mode Access to the HFSTS registers via the HECI is not possible on systems that use Intel's High Assurance Platform mode. This means that we can't check the BootGuard policy. However, the startup ACM mirrors some BootGuard policy settings to a MSR, so we can check this as a fallback in this case. There are some limitations here - it's not possible to check some bits that indicate the platform has properly transitioned out of manufacturing mode, and the error enforcement bits of the BootGuard policy are not available either. However, there are no combinations of the other policy bits that are duplicated with different error enforcement bits for any of the recognized profiles, so this doesn't matter. Note that the reporter of this issue also noted that turning on HAP mode resulted in an unexpected EV_EFI_ACTION event being measured to PCR7 on their system. This doesn't fix that yet because I'm still waiting on a response from the reporter.
| // -*- Mode: Go; indent-tabs-mode: t -*- | ||
|
|
||
| /* | ||
| * Copyright (C) 2024 Canonical Ltd |
Contributor
Author
There was a problem hiding this comment.
I'll change that :)
| // where these bits are reused with different error enforcement policies. | ||
| f := s&bootGuardFACB > 0 | ||
| v := s&bootGuardVerifiedBoot > 0 | ||
| m := s&bootGuardMeasuredBoot > 0 |
Member
There was a problem hiding this comment.
I suppose this measured boot has nothing to do with TPM, or does it?
Contributor
Author
There was a problem hiding this comment.
It implies that the ACM is the root of trust for measurement rather than the EFI firmware measuring itself.
valentindavid
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Access to the HFSTS registers via the HECI is not possible on systems
that use Intel's High Assurance Platform mode. This means that we can't
check the BootGuard policy. However, the startup ACM mirrors some
BootGuard policy settings to a MSR, so we can check this as a fallback
in this case.
There are some limitations here - it's not possible to check some bits
that indicate the platform has properly transitioned out of
manufacturing mode, and the error enforcement bits of the BootGuard
policy are not available either. However, there are no combinations of
the other policy bits that are duplicated with different error
enforcement bits for any of the recognized profiles, so this doesn't
matter.
Note that the reporter of this issue also noted that turning on HAP mode
resulted in an unexpected EV_EFI_ACTION event being measured to PCR7 on
their system. This doesn't fix that yet because I'm still waiting on a
response from the reporter.